import {
  Body,
  Controller,
  Delete,
  Get,
  Param,
  Patch,
  Query,
} from '@nestjs/common';
import { UpdateTowerPointDto } from './dto/update-tower-point.dto';
import { TowerPointService } from './tower-point.service';

@Controller('tower-point')
export class TowerPointController {
  constructor(private readonly towerPointService: TowerPointService) {}

  @Get()
  async findAll(@Query() args = {}) {
    return await this.towerPointService.findAll(args);
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.towerPointService.findOne(+id);
  }

  @Patch(':id')
  update(
    @Param('id') id: string,
    @Body() updateTowerPointDto: UpdateTowerPointDto,
  ) {
    return this.towerPointService.update(+id, updateTowerPointDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.towerPointService.remove(+id);
  }
}
